/*
*	(*^。^*) TFrameWork License (*^。^*)
*/

/*
 *  Title :  
 *          
 *  Description :  
 *          
 *          
 *  Date : 
 *
 *  Author : DengPing
 *
 *  Modify : 
 */

using UnityEngine.Playables;

namespace TFrameWork.Module.ActionEditor
{
    //PlayableBehaviour 是一个基类，所有自定义的可播放脚本均派生自该类。
    public class AnimAdapter : PlayableBehaviour
    {
        private AnimBehaviour _behaviour;

        public void Init(AnimBehaviour behaviour)
        {
            _behaviour = behaviour;
        }

        public void Enable()
        {
            _behaviour?.Enable();
        }

        public void Disable()
        {
            _behaviour?.Disable();
        }
        

        public override void PrepareFrame(Playable playable, FrameData info)
        {
            _behaviour?.Execute(playable,info);
        }
    }
}
